package com.datacow.moudle.constant;


/**
 * @Description: 获取信息的匹配规则
 * @Author: 李德森
 * @Date: 2021/1/14
 */

public class ProductHuntInfo {
    public static class MatchingRule {
        /**
         * CSS规则匹配标题的Selector
         */
        public static final String CSS_RULE_GET_TITLE = "h1[class*='styles_headerPostName']";
        /**
         * CSS规则匹配url的Selector
         */
        public static final String CSS_RULE_GET_URL = "ul[class*='styles_postsList__3kH3x'] a[data-test*='post-name']";
        /**
         * CSS规则匹配getIt重定向url的Selector
         */
        public static final String CSS_RULE_GET_REDIRECTURL = "h1[class*='styles_headerPostName']";
        /**
         * CSS规则匹配点赞数量的Selector
         */
        public static final String CSS_RULE_GET_LIKES = "span[class*='styles_bigButtonCount']";
        /**
         * CSS规则匹配应用程序详细描述的Selector
         */
        public static final String CSS_RULE_GET_DESCRIPTION = "section[class*='styles_descriptionWrap'] div[class*=styles_description]";
        /**
         * CSS规则匹配图片链接的Selector
         */
        public static final String CSS_RULE_GET_PICTURE_LINKS = "section[class*='styles_descriptionWrap']";
        /**
         * XPATH规则匹配标题的node
         */
        public static final String XPATH_RULE_GET_TITLE = "//h1/a/text()";
        /**
         * XPATH规则匹配url的node
         */
        public static final String XPATH_RULE_GET_URL = "//a/@href";
        /**
         * XPATH规则匹配getIt重定向url的node
         */
        public static final String XPATH_RULE_GET_REDIRECTURL = "//h1/a/@href";
        /**
         * XPATH规则匹配点赞数量的node
         */
        public static final String XPATH_RULE_GET_LIKES = "//span/text()";
        /**
         * XPATH规则匹配应用程序详细描述的node
         */
        public static final String XPATH_RULE_GET_DESCRIPTION = "";
        /**
         * XPATH规则匹配图片链接的node
         */
        public static final String XPATH_RULE_GET_PICTURE_LINKS = "//ol/li/a/@href";
        /**
         * 抽取信息的网站首页
         */
        public static final String HOME_PAGE = "https://www.producthunt.com";
        /**
         * 后续网页匹配规则
         */
        public static final String AFTER_PAGE_RULE ="/posts/.*";
        /**
         * 过滤标签匹配规则
         */
        public static final String FILTER_TAGS ="<.*?>";

        /**
         * 过滤表情匹配规则
         */
        public static final String FILTER_EMOJI ="[\\ud800\\udc00-\\udbff\\udfff\\ud800-\\udfff]";

    }

}
